<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>OpenSSL</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.mhash.html">« mhash</a></li>
      <li style="float: right;"><a href="intro.openssl.html">简介 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="refs.crypto.html">加密扩展</a></li>
    <li>OpenSSL</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="book.openssl" class="book">
 
 <h1 class="title">OpenSSL</h1>
 
 
 
 
 
 









 









 









 




 




 









 





 

 





 

 





 


<ul class="chunklist chunklist_book"><li><a href="intro.openssl.html">简介</a></li><li><a href="openssl.setup.html">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="openssl.requirements.html">需求</a></li><li><a href="openssl.installation.html">安装</a></li><li><a href="openssl.configuration.html">运行时配置</a></li><li><a href="openssl.resources.html">资源类型</a></li></ul></li><li><a href="openssl.constants.html">预定义常量</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="openssl.purpose-check.html">目的检查标志</a></li><li><a href="openssl.padding.html">非对称加密的填充标志</a></li><li><a href="openssl.key-types.html">密钥类型</a></li><li><a href="openssl.pkcs7.flags.html">PKCS7 标志/常量</a></li><li><a href="openssl.signature-algos.html">Signature Algorithms</a></li><li><a href="openssl.ciphers.html">Ciphers</a></li><li><a href="openssl.constversion.html">Version constants</a></li><li><a href="openssl.constsni.html">Server Name Indication constants</a></li></ul></li><li><a href="openssl.certparams.html">密钥/证书参数</a></li><li><a href="openssl.cert.verification.html">证书验证</a></li><li><a href="ref.openssl.html">OpenSSL 函数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.openssl-cipher-iv-length.html">openssl_cipher_iv_length</a> — 获取密码iv长度</li><li><a href="function.openssl-cipher-key-length.html">openssl_cipher_key_length</a> — Gets the cipher key length</li><li><a href="function.openssl-cms-decrypt.html">openssl_cms_decrypt</a> — Decrypt a CMS message</li><li><a href="function.openssl-cms-encrypt.html">openssl_cms_encrypt</a> — Encrypt a CMS message</li><li><a href="function.openssl-cms-read.html">openssl_cms_read</a> — Export the CMS file to an array of PEM certificates</li><li><a href="function.openssl-cms-sign.html">openssl_cms_sign</a> — Sign a file</li><li><a href="function.openssl-cms-verify.html">openssl_cms_verify</a> — Verify a CMS signature</li><li><a href="function.openssl-csr-export-to-file.html">openssl_csr_export_to_file</a> — 将CSR导出到文件</li><li><a href="function.openssl-csr-export.html">openssl_csr_export</a> — 将CSR作为字符串导出</li><li><a href="function.openssl-csr-get-public-key.html">openssl_csr_get_public_key</a> — 返回CSR的公钥</li><li><a href="function.openssl-csr-get-subject.html">openssl_csr_get_subject</a> — 返回CSR的主题</li><li><a href="function.openssl-csr-new.html">openssl_csr_new</a> — 生成一个 CSR</li><li><a href="function.openssl-csr-sign.html">openssl_csr_sign</a> — 用另一个证书签署 CSR (或者本身) 并且生成一个证书</li><li><a href="function.openssl-decrypt.html">openssl_decrypt</a> — 解密数据</li><li><a href="function.openssl-dh-compute-key.html">openssl_dh_compute_key</a> — 计算远程DH密钥(公钥)和本地DH密钥的共享密钥</li><li><a href="function.openssl-digest.html">openssl_digest</a> — 计算摘要</li><li><a href="function.openssl-encrypt.html">openssl_encrypt</a> — 加密数据</li><li><a href="function.openssl-error-string.html">openssl_error_string</a> — 返回 openSSL 错误消息</li><li><a href="function.openssl-free-key.html">openssl_free_key</a> — 释放密钥资源</li><li><a href="function.openssl-get-cert-locations.html">openssl_get_cert_locations</a> — 检索可用的证书位置</li><li><a href="function.openssl-get-cipher-methods.html">openssl_get_cipher_methods</a> — 获取可用的加密算法</li><li><a href="function.openssl-get-curve-names.html">openssl_get_curve_names</a> — 获得ECC的可用曲线名称列表</li><li><a href="function.openssl-get-md-methods.html">openssl_get_md_methods</a> — 获取可用的摘要算法</li><li><a href="function.openssl-get-privatekey.html">openssl_get_privatekey</a> — 别名 openssl_pkey_get_private</li><li><a href="function.openssl-get-publickey.html">openssl_get_publickey</a> — 别名 openssl_pkey_get_public</li><li><a href="function.openssl-open.html">openssl_open</a> — 打开密封的数据</li><li><a href="function.openssl-pbkdf2.html">openssl_pbkdf2</a> — 生成一个 PKCS5 v2 PBKDF2 字符串</li><li><a href="function.openssl-pkcs12-export-to-file.html">openssl_pkcs12_export_to_file</a> — 输出一个 PKCS#12 兼容的证书存储文件</li><li><a href="function.openssl-pkcs12-export.html">openssl_pkcs12_export</a> — 将 PKCS#12 兼容证书存储文件导出到变量</li><li><a href="function.openssl-pkcs12-read.html">openssl_pkcs12_read</a> — 将 PKCS#12 证书存储区解析到数组中</li><li><a href="function.openssl-pkcs7-decrypt.html">openssl_pkcs7_decrypt</a> — 解密一个 S/MIME 加密的消息</li><li><a href="function.openssl-pkcs7-encrypt.html">openssl_pkcs7_encrypt</a> — 加密一个 S/MIME 消息</li><li><a href="function.openssl-pkcs7-read.html">openssl_pkcs7_read</a> — 将 PKCS7 文件导出为 PEM 格式证书的数组</li><li><a href="function.openssl-pkcs7-sign.html">openssl_pkcs7_sign</a> — 对一个 S/MIME 消息进行签名</li><li><a href="function.openssl-pkcs7-verify.html">openssl_pkcs7_verify</a> — 校验一个已签名的 S/MIME 消息的签名</li><li><a href="function.openssl-pkey-derive.html">openssl_pkey_derive</a> — Computes shared secret for public value of remote and local DH or ECDH key</li><li><a href="function.openssl-pkey-export-to-file.html">openssl_pkey_export_to_file</a> — 将密钥导出到文件中</li><li><a href="function.openssl-pkey-export.html">openssl_pkey_export</a> — 将一个密钥的可输出表示转换为字符串</li><li><a href="function.openssl-pkey-free.html">openssl_pkey_free</a> — 释放一个私钥</li><li><a href="function.openssl-pkey-get-details.html">openssl_pkey_get_details</a> — 返回包含密钥详情的数组</li><li><a href="function.openssl-pkey-get-private.html">openssl_pkey_get_private</a> — 获取私钥</li><li><a href="function.openssl-pkey-get-public.html">openssl_pkey_get_public</a> — 从证书中解析公钥，以供使用。</li><li><a href="function.openssl-pkey-new.html">openssl_pkey_new</a> — 生成一个新的私钥</li><li><a href="function.openssl-private-decrypt.html">openssl_private_decrypt</a> — 使用私钥解密数据</li><li><a href="function.openssl-private-encrypt.html">openssl_private_encrypt</a> — 使用私钥加密数据</li><li><a href="function.openssl-public-decrypt.html">openssl_public_decrypt</a> — 使用公钥解密数据</li><li><a href="function.openssl-public-encrypt.html">openssl_public_encrypt</a> — 使用公钥加密数据</li><li><a href="function.openssl-random-pseudo-bytes.html">openssl_random_pseudo_bytes</a> — 生成一个伪随机字节串</li><li><a href="function.openssl-seal.html">openssl_seal</a> — 密封 (加密) 数据</li><li><a href="function.openssl-sign.html">openssl_sign</a> — Generate signature</li><li><a href="function.openssl-spki-export-challenge.html">openssl_spki_export_challenge</a> — 导出与签名公钥和挑战相关的挑战字符串</li><li><a href="function.openssl-spki-export.html">openssl_spki_export</a> — 通过签名公钥和挑战导出一个可用的PEM格式的公钥</li><li><a href="function.openssl-spki-new.html">openssl_spki_new</a> — 生成一个新的签名公钥和挑战</li><li><a href="function.openssl-spki-verify.html">openssl_spki_verify</a> — 验证签名公钥和挑战。</li><li><a href="function.openssl-verify.html">openssl_verify</a> — 验证签名</li><li><a href="function.openssl-x509-check-private-key.html">openssl_x509_check_private_key</a> — 检查私钥是否对应于证书</li><li><a href="function.openssl-x509-checkpurpose.html">openssl_x509_checkpurpose</a> — 验证是否可以为特定目的使用证书</li><li><a href="function.openssl-x509-export-to-file.html">openssl_x509_export_to_file</a> — 导出证书至文件</li><li><a href="function.openssl-x509-export.html">openssl_x509_export</a> — 以字符串格式导出证书</li><li><a href="function.openssl-x509-fingerprint.html">openssl_x509_fingerprint</a> — 计算一个给定的x.509证书的指纹或摘要</li><li><a href="function.openssl-x509-free.html">openssl_x509_free</a> — 释放证书资源</li><li><a href="function.openssl-x509-parse.html">openssl_x509_parse</a> — 解析一个X509证书并作为一个数组返回信息</li><li><a href="function.openssl-x509-read.html">openssl_x509_read</a> — 解析一个x.509证书并返回一个资源标识符</li><li><a href="function.openssl-x509-verify.html">openssl_x509_verify</a> — Verifies digital signature of x509 certificate against a public key</li></ul></li><li><a href="class.opensslcertificate.html">OpenSSLCertificate</a> — OpenSSLCertificate 类</li><li><a href="class.opensslcertificatesigningrequest.html">OpenSSLCertificateSigningRequest</a> — OpenSSLCertificateSigningRequest 类</li><li><a href="class.opensslasymmetrickey.html">OpenSSLAsymmetricKey</a> — OpenSSLAsymmetricKey 类</li></ul></div></div></div></body></html>